<% content_for :maps do %>
<% if RAILS_ENV == "production" %>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAuunGS_VtjHf9ymsKEjhoRBSSHSGZ60oIcyQqQJfOT05d_h2_CRT3d7pEbT2gfxLvx0ac1yBom78f-w" type="text/javascript"></script>
<% else %>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAuunGS_VtjHf9ymsKEjhoRBTJQa0g3IQ9GZqIMmInSLzwtGDKaBSkf_JiFVsob6gVhskLQRN0LYystw" type="text/javascript"></script>
<% end %>
<script type="text/javascript">
    //<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
    	map.setCenter(new GLatLng(<%= @last_msg.position %>), 12);
        var point = new GLatLng(<%= @last_msg.position %>);
        map.addOverlay(new GMarker(point));
      }
    }
    
    window.onload = load;

    //]]>
</script>

<% end %>
<p><strong><%= @last_msg.user.login %></strong> envió un mensaje a su <strong><%= @last_msg.user.mum %></strong> hace <%= sp_distance_of_time_in_words(@last_msg.created_at, Time.now) %></p>
<div id="map" style="width:330px; height: 180px"></div>
